package com.sy.service;


import com.sbring.Autowired;
import com.sbring.BeanNameAware;
import com.sbring.Component;
import com.sbring.InitializingBean;

@Component("userService")
public class UserService implements BeanNameAware, InitializingBean {
    @Autowired
    private OrderService orderService;

    private String beanName;

    @Override
    public void setBeanName(String name) {
        beanName = name;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("初始化");
    }

    public void test(){
        System.out.println(orderService+orderService.getName());
        System.out.println(beanName);
    }
}
